import en from 'element-plus/es/locale/lang/en';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import { createI18n } from 'vue-i18n';
import localEn from './languages/en';
import localZhCn from './languages/zh-cn';

// project i18n
const i18n = createI18n({
  legacy: false,
  locale: 'zh-cn',
  fallbackLocale: 'en',
  messages: {
    'zh-cn': localZhCn,
    'en': localEn
  }
});

// element i18n
export const elementLocales = {
  'zh-cn': zhCn,
  en
};

export default i18n;

